<?php
#########################################################
#                                                       #
#  PayPal / PayPal payment method                           #
#  This module is used for real time processing         #
#                                                       #
#  Copyright (c) Novalnet AG                                #
#                                                       #
#  Released under the GNU General Public License        #
#  This free contribution made by request.              #
#  If you have found this script usefull a small        #
#  recommendation as well as a comment on merchant form #
#  would be greatly appreciated.                        #
#                                                       #
#  Script : novalnet_paypal.php                                     #
#                                                       #
#########################################################

include_once 'novalnet_common.php';

define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_TITLE', 'PayPal');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_PUBLIC_TITLE', 'PayPal');

define('MODULE_PAYMENT_NOVALNET_PAYPAL_LOGO_TITLE', NOVALNET_TEXT_LOGO_IMAGE . '&nbsp;');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_PAYMENT_LOGO_TITLE', '<a href="http://www.novalnet.com" target="_new"><img src="'.$img_src.'Paypal.png" alt="PayPal" height="25px;" title="PayPal" border="0"></a>');

if (MODULE_PAYMENT_NOVALNET_PAYPAL_NOVALNET_LOGO_ACTIVE_MODE == 'True') {
        define('MODULE_PAYMENT_NOVALNET_PAYPAL_LOGO_STATUS',  MODULE_PAYMENT_NOVALNET_PAYPAL_LOGO_TITLE);
} else{
        define('MODULE_PAYMENT_NOVALNET_PAYPAL_LOGO_STATUS', '' );
}

if (MODULE_PAYMENT_NOVALNET_PAYPAL_PAYMENT_LOGO_ACTIVE_MODE == 'True') {
        define('MODULE_PAYMENT_NOVALNET_PAYPAL_PAYMENT_LOGO_STATUS', MODULE_PAYMENT_NOVALNET_PAYPAL_PAYMENT_LOGO_TITLE);
}else {
        define('MODULE_PAYMENT_NOVALNET_PAYPAL_PAYMENT_LOGO_STATUS', '');
}

define('MODULE_PAYMENT_NOVALNET_PAYPAL_API_USER_TITLE', 'PayPal API User Name');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_API_USER_DESC', 'Please enter your PayPal API username');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_API_USER', 'PayPal API User Name');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_API_PASSWORD_TITLE', 'PayPal API Password');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_API_PASSWORD_DESC', 'Please enter your PayPal API password');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_API_PASSWORD', 'PayPal API Password');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_API_SIGNATURE_TITLE', 'PayPal API Signature');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_API_SIGNATURE_DESC', 'Please enter your PayPal API signature');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_API_SIGNATURE', 'PayPal API Signature');
define('MODULE_PAYMENT_PAYPAL_TEXT_INFO', '<img src="https://www.paypal.com/de_DE/DE/i/logo/lockbox_150x47.gif" />');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_DESCRIPTION', '<span style="float:left;clear:both;">' . NOVALNET_REDIRECT_TEXT_DESCRIPTION . '</span>');
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_LANG', NOVALNET_TEXT_LANG);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_INFO', NOVALNET_TEXT_INFO);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS_TITLE', NOVALNET_STATUS_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_STATUS_DESC', NOVALNET_STATUS_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_VENDOR_ID_TITLE', NOVALNET_VENDOR_ID_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_VENDOR_ID_DESC', NOVALNET_VENDOR_ID_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_AUTH_CODE_TITLE', NOVALNET_AUTH_CODE_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_AUTH_CODE_DESC', NOVALNET_AUTH_CODE_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_PRODUCT_ID_TITLE', NOVALNET_PRODUCT_ID_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_PRODUCT_ID_DESC', NOVALNET_PRODUCT_ID_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TARIFF_ID_TITLE', NOVALNET_TARIFF_ID_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TARIFF_ID_DESC', NOVALNET_TARIFF_ID_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_INFO_TITLE', NOVALNET_INFO_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_INFO_DESC', NOVALNET_INFO_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_BEFORE_ORDER_STATUS_ID_TITLE', NOVALNET_BEFORE_ORDER_STATUS_ID_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_BEFORE_ORDER_STATUS_ID_DESC', NOVALNET_ORDER_STATUS_ID_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_AFTER_ORDER_STATUS_ID_TITLE', NOVALNET_AFTER_ORDER_STATUS_ID_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_AFTER_ORDER_STATUS_ID_DESC', NOVALNET_ORDER_STATUS_ID_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER_TITLE', NOVALNET_SORT_ORDER_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_SORT_ORDER_DESC', NOVALNET_SORT_ORDER_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE_TITLE', NOVALNET_ZONE_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_ZONE_DESC', NOVALNET_ZONE_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_ALLOWED_TITLE', NOVALNET_ALLOWED_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_ALLOWED_DESC', NOVALNET_ALLOWED_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_JS_NN_MISSING', NOVALNET_TEXT_JS_NN_MISSING);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_ERROR', NOVALNET_ACCOUNT_TEXT_ERROR);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_CUST_INFORM', NOVALNET_TEXT_CUST_INFORM);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE', NOVALNET_TEST_MODE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_IN_TEST_MODE', NOVALNET_IN_TEST_MODE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_NOT_CONFIGURED', NOVALNET_NOT_CONFIGURED);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE_TITLE', NOVALNET_TEST_MODE_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_MODE_DESC', NOVALNET_TEST_MODE_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_HASH_ERROR', NOVALNET_TEXT_HASH_ERROR);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_PASSWORD_TITLE', NOVALNET_PASSWORD_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_PASSWORD_DESC', NOVALNET_PASSWORD_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_PROXY_TITLE', NOVALNET_PROXY_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_PROXY_DESC', NOVALNET_PROXY_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_REFERENCE1_TITLE', NOVALNET_REFERENCE1_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_REFERENCE1_DESC', NOVALNET_REFERENCE1_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_REFERENCE2_TITLE', NOVALNET_REFERENCE2_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_REFERENCE2_DESC', NOVALNET_REFERENCE2_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_REFERRER_ID_TITLE', NOVALNET_REFERRER_ID_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_REFERRER_ID_DESC', NOVALNET_REFERRER_ID_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEST_ORDER_MESSAGE', NOVALNET_TEST_ORDER_MESSAGE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TID_MESSAGE', NOVALNET_TID_MESSAGE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_TEXT_REFERRER_ID_ERROR', NOVALNET_REFERRER_ID_ERROR);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_NOVALNET_LOGO_ACTIVE_MODE_TITLE', NOVALNET_LOGO_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_NOVALNET_LOGO_ACTIVE_MODE_DESC', NOVALNET_LOGO_DESC);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_PAYMENT_LOGO_ACTIVE_MODE_TITLE', NOVALNET_PAYMENT_LOGO_TITLE);
define('MODULE_PAYMENT_NOVALNET_PAYPAL_PAYMENT_LOGO_ACTIVE_MODE_DESC', NOVALNET_PAYMENT_LOGO_DESC);
